Avoid some compiler warnings from clang in deprecated code.
Most of these are around our habit of using -1 as an 'unset'
value for enumerations.
const gchar *text;
text = gtk_entry_get_text (GTK_ENTRY (priv->size_entry));
- new_size = MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
+ new_size = (int) MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
if (priv->size != new_size)
gtk_font_selection_set_size (fontsel, new_size);
const gchar *text;
text = gtk_entry_get_text (GTK_ENTRY (priv->size_entry));
- new_size = MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
+ new_size = (int) MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
gtk_font_selection_set_size (fontsel, new_size);
{
/* Properties */
GtkPositionType handle_position;
- GtkPositionType snap_edge;
+ gint snap_edge;
GtkShadowType shadow_type;
gboolean child_detached;
/* Properties */
{
g_return_val_if_fail (GTK_IS_HANDLE_BOX (handle_box), (GtkPositionType)-1);
- return handle_box->priv->snap_edge;
+ return (GtkPositionType)handle_box->priv->snap_edge;
}
/**
}
if (source_data->icon_name)
gtk_icon_source_set_icon_name (icon_source, source_data->icon_name);
- if (source_data->size != -1)
+ if ((gint)source_data->size != -1)
{
gtk_icon_source_set_size (icon_source, source_data->size);
gtk_icon_source_set_size_wildcarded (icon_source, FALSE);
}
- if (source_data->direction != -1)
+ if ((gint)source_data->direction != -1)
{
gtk_icon_source_set_direction (icon_source, source_data->direction);
gtk_icon_source_set_direction_wildcarded (icon_source, FALSE);
}
- if (source_data->state != -1)
+ if ((gint)source_data->state != -1)
{
gtk_icon_source_set_state (icon_source, source_data->state);
gtk_icon_source_set_state_wildcarded (icon_source, FALSE);
gpointer old_key, old_value;
const GtkStockItem *item = &items[i];
- if (replace_primary && item->modifier == PRIMARY_MODIFIER)
+ if (replace_primary && (guint)item->modifier == PRIMARY_MODIFIER)
{
item = gtk_stock_item_copy (item);
((GtkStockItem *)item)->modifier = (NON_STATIC_MASK |